﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;

/// <summary>
///SingleRecord 的摘要说明
/// </summary>
public abstract class SingleRecord
{
    private string s_JH;
    private string s_JB;
    private string s_CSLB;
    private string s_KGRQ;
    private string s_WGRQ;
    private string s_CSMC;
    private string s_SGFS;
    private string s_CSCD;
    private string s_BZ;
    private string s_SelectStr;
    private string s_InsertStr;
    private string s_UpdateStr;

    public SingleRecord(string jh,string jb,string cslb,string kgrq,string wgrq,string csmc,string sgfs,string cscd,string bz)
    {
        JH = jh;
        JB = jb;
        CSLB = cslb;
        KGRQ = kgrq;
        WGRQ = wgrq;
        CSMC = csmc;
        SGFS = sgfs;
        CSCD = cscd;
        BZ = bz;
    }
    public SingleRecord(DataRow dr)
    {
        JH = dr["井号"].ToString();
        JB = dr["井别"].ToString();
        CSLB = dr["措施类别"].ToString();
        KGRQ = Convert.ToDateTime(dr["开工日期"]).ToShortDateString();
        WGRQ = Convert.ToDateTime(dr["完工日期"]).ToShortDateString();
        CSMC = dr["措施名称"].ToString();
        SGFS = dr["施工方式"].ToString();
        CSCD = dr["措施层段"].ToString();
        BZ = dr["备注"].ToString();
    }
    public bool isNotEmpty()
    {
        if (JH != "" && JB != "" && KGRQ.ToString() != "")//井号、井别和开工日期三者同时不为空才能判断为非空
        {
            return true;
        }
        else
        {
            return false;
        }
    }
    public string JH
    {
        get { return s_JH; }
        set { if (s_JH != value) { s_JH = value; } }
    }
    public string JB
    {
        get { return s_JB; }
        set { if (s_JB != value) { s_JB = value; } }
    }
    public string CSLB
    {
        get { return s_CSLB; }
        set { if (s_CSLB != value) { s_CSLB = value; } }
    }
    public string KGRQ
    {
        get { return s_KGRQ; }
        set { if (s_KGRQ != value){ s_KGRQ = value;}}
    }
    public string WGRQ
    {
        get { return s_WGRQ; }
        set { if (s_WGRQ != value) { s_WGRQ = value; } }
    }
    public string CSMC
    {
        get { return s_CSMC; }
        set { if (s_CSMC != value) { s_CSMC = value; } }
    }
    public string SGFS
    {
        get { return s_SGFS; }
        set { if (s_SGFS != value) { s_SGFS = value; } }
    }
    public string CSCD
    {
        get { return s_CSCD; }
        set { if (s_CSCD != value) { s_CSCD = value; } }
    }
    public string BZ
    {
        get { return s_BZ; }
        set { if (s_BZ != value) { s_BZ = value; } }
    }
    public string SelectStr
    {
        get { return s_SelectStr; }
        set { if (s_SelectStr != value) { s_SelectStr = value; } }
    }
    public string InsertStr
    {
        get { return s_InsertStr; }
        set { if (s_InsertStr != value) { s_InsertStr = value; } }
    }
    public string UpdateStr
    {
        get { return s_UpdateStr; }
        set { if (s_UpdateStr != value) { s_UpdateStr = value; } }
    }
}